#include <iostream>
#include <typeinfo>
#include <vector>
#include <list>

using namespace std;

template<typename... Args> inline void pass(const Args&...) {}

template< class... T >
struct X : T...
{
    X( const T&... t ): T(t)... { cout << "ctor" << endl; }
    X(): T()... { cout << "def ctor" << endl; }
    X( const X& x ): T(x)... { cout << "copy ctor" << endl; }

    size_t size()
    {
        size_t r = 0;
        for ( size_t i: { (size_t) T::size()... } )
            r += i;
        return r;
    }

    void push_back( typename T::value_type ... vals )
    {
       int li[] = { (T::push_back(vals), 1)... };
    }
};

int main()
{
    X< vector<char>, list<int> > x;
    x.push_back('c', 2);
    x.vector<char>::push_back(1);

    cout << x.size() << endl;

    X< vector<char> > xcopy(x);

    cin.get();

    return 0;
}
